// import Vue from 'vue'
// import Vuex from 'vuex'
// import common from './common'
// import getters from './getters'

// Vue.use(Vuex)
// const store = new Vuex.Store({
//   modules: {
//     common,
//     // user
//   },
//   getters
// })

// export default store

import Vue from 'vue'
import Vuex from 'vuex'
import common from './common'
import getters from './getters'

Vue.use(Vuex)
// 状态实例
let store
// 状态配置项
let storeOptions = {
  modules: {
    common,
  },
  getters
}

export default () => {
  store = new Vuex.Store(storeOptions)
}

export { store, storeOptions }